package demo4;

public class Person {
    private String name;
    private int age;
    public static String school = "bitU";

    public Person(String name, int age, String school){
        this.name = name;
        this.age = age;
        this.school = school;
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void setAge(int age){
        this.age = age;
        /*System.out.println(Person.school);
        getSchool();*/
    }

    public int getAge(){
        return this.age;
    }

    public static String getSchool(){
        return school;
    }

    @Override
    public String toString(){
        return "姓名:" + this.name + ", 年龄:" + this.age;
    }

    public static void func(){
        /*setAge();
        this.age = 10;*/
        Person person = new Person("ben", 10);
        person.setAge(19);
    }

}
